<?php

require_once "core/application/models/mchangelogin/mchangelogin1.php";

class Mchangelogin2 extends Mchangelogin1 {

    private $_query;

    protected function issetThisLogin($newLogin) {
        /**
         *  существует ли такой аккаунт
         * @param string $newLogin
         */DB::getInstance()->openConnectionToLS();
        $this->_query = "SELECT `name` FROM `account_data` WHERE `name` = '$newLogin'";
        if (mysql_num_rows(DB::getInstance()->sql($this->_query))) {
            return true;
            DB::getInstance()->closeConnection();
            unset($this->_query);
        } else {
            return false;
            DB::getInstance()->closeConnection();
            unset($this->_query);
        }
    }

}

?>
